Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dependencies.py: use Enum rather than StrEnum for DependencyKind #46

Closed
wants to merge 1 commit into from

Conversation

Jturnerusa
Copy link
Contributor

StrEnum is only supported in Python versions 3.11 and newer. Gentoolkit should not require >=3.11, so DependencyKind will use the regular Enum feature instead.

The difference between StrEnum and Enum is that StrEnum members are strings and can generally be used in place of strings in APIs expecting string input. Non-StrEnum members are not strings, but you can get members values by accessing their value field (DependencyKind.DEPEND.value).

StrEnum is only supported in Python versions 3.11 and
newer. Gentoolkit should not require >=3.11, so DependencyKind will
use the regular Enum feature instead.

The difference between StrEnum and Enum is that StrEnum members are
strings and can generally be used in place of strings in APIs
expecting string input. Non-StrEnum members are not strings, but you
can get members values by accessing their value field (DependencyKind.DEPEND.value).

Signed-off-by: John Turner <[email protected]>
@Jturnerusa Jturnerusa force-pushed the feature/remove-strenum branch from ceaa7d9 to 2896f32 Compare March 6, 2024 20:30
@gentoo-bot gentoo-bot closed this in 5c8f8d7 Mar 7, 2024
@thesamesam
Copy link
Member

Thanks, merged with Fixes:.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants